home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / libspool.z / libspool
Text File  |  1998-10-30  |  7KB  |  133 lines

  1.  
  2.  
  3.  
  4. LLLLIIIIBBBBSSSSPPPPOOOOOOOOLLLL((((3333))))                      IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                       LLLLIIIIBBBBSSSSPPPPOOOOOOOOLLLL((((3333))))
  5.  
  6.  
  7.  
  8. LLLLIIIIBBBBRRRRAAAARRRRYYYY DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  9.      _l_i_b_s_p_o_o_l provides a C Language application programming interface (API) to
  10.      the UNIX printer spooling system. There are two common UNIX printer
  11.      spooling systems, System V and BSD.  While both of these spooling systems
  12.      provide essentially the same capabilities, each has its own command set
  13.      and neither provides a C API.  _l_i_b_s_p_o_o_l provides a single API to both
  14.      spooling systems. Spooling functions provided by _l_i_b_s_p_o_o_l include print
  15.      job submittal and cancel, print queue reading and control.
  16.  
  17. LLLLIIIIBBBBRRRRAAAARRRRYYYY AAAACCCCCCCCEEEESSSSSSSS
  18.      A program that calls _l_i_b_s_p_o_o_l functions must include the _s_p_o_o_l._h header
  19.      file located in the ////uuuussssrrrr////iiiinnnncccclllluuuuddddeeee directory. In addition, the program must
  20.      link with the _l_i_b_s_p_o_o_l._a library located in ////uuuussssrrrr////lllliiiibbbb. The link line would
  21.      look like:
  22.  
  23.       ... -lspool ...
  24.  
  25. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  26.      SSSSppppoooooooolllliiiinnnngggg SSSSyyyysssstttteeeemmmm SSSSeeeelllleeeeccccttttiiiioooonnnn
  27.                     SLSetSpooler
  28.                     SLGetSpooler
  29.  
  30.      PPPPrrrriiiinnnntttteeeerrrr IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
  31.                     SLGetPrinterList
  32.                     SLGetPrinterInfo
  33.                     SLGetDefPrinterName
  34.  
  35.      OOOOppppttttiiiioooonnnn MMMMaaaannnnaaaaggggeeeemmmmeeeennnntttt
  36.                     SLGetPrinterSettings
  37.                     SLSysVGetSpoolerOptions
  38.                     SLSysVGetPrinterOptions
  39.                     SLSysVSaveSpoolerOptions
  40.                     SLSysVSavePrinterOptions
  41.  
  42.      PPPPrrrriiiinnnntttt JJJJoooobbbb HHHHaaaannnnddddlllliiiinnnngggg
  43.                     SLSubmitJob
  44.                     SLSubmitJobFd
  45.                     SLSubmitJobBuf
  46.                     SLSubmitJobSimple
  47.                     SLCancelJob
  48.  
  49.      PPPPrrrriiiinnnntttteeeerrrr QQQQuuuueeeeuuuueeee IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
  50.                     SLGetQueue
  51.  
  52.      PPPPrrrriiiinnnntttteeeerrrr QQQQuuuueeeeuuuueeee CCCCoooonnnnttttrrrroooollll
  53.                     SLSetSpoolerState
  54.                     SLGetSpoolerState
  55.  
  56.      EEEExxxxeeeeccccuuuuttttiiiioooonnnn EEEErrrrrrrroooorrrr HHHHaaaannnnddddlllliiiinnnngggg
  57.                     SLPerror
  58.                     SLGetSpoolerError
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. LLLLIIIIBBBBSSSSPPPPOOOOOOOOLLLL((((3333))))                      IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                       LLLLIIIIBBBBSSSSPPPPOOOOOOOOLLLL((((3333))))
  71.  
  72.  
  73.  
  74. AAAARRRRCCCCHHHHIIIITTTTEEEECCCCTTTTUUUURRRREEEE
  75.      Many of the _l_i_b_s_p_o_o_l functions rely on the System V or BSD spooling
  76.      system shell-level commands to accomplish the actual spooling system
  77.      work. The architecture of the library is depicted below.
  78.  
  79.                                    User Program
  80.                                          |
  81.                                      libspool
  82.                                          |
  83.                          System V       ___         BSD
  84.                      Spooling Commands       Spooling Commands
  85.  
  86. DDDDEEEEBBBBUUUUGGGGGGGGIIIINNNNGGGG
  87.      If the global variable _S_L_d_e_b_u_g is set to a non-zero value, _l_i_b_s_p_o_o_l will
  88.      print debugging information to standard error during execution. The
  89.      global _S_L_d_e_b_u_g is declared in the header file _s_p_o_o_l._h.
  90.  
  91. SSSSIIIIGGGGNNNNAAAALLLL HHHHAAAANNNNDDDDLLLLIIIINNNNGGGG ((((SSSSIIIIGGGGCCCCLLLLDDDD))))
  92.      A number of _l_i_b_s_p_o_o_l functions spawn child processes to accomplish their
  93.      tasks. The child processes are executed in a blocking fashion whereby the
  94.      parent waits for the child to complete its processing. During the
  95.      execution of a child process, _l_i_b_s_p_o_o_l explicitly ignores the SSSSIIIIGGGGCCCCLLLLDDDD
  96.      signal.  Following execution of the child, the library restores the
  97.      original SSSSIIIIGGGGCCCCLLLLDDDD handling. The library uses the PPPPOOOOSSSSIIIIXXXX signal handling
  98.      function _s_i_g_a_c_t_i_o_n(_2) to set the state of signal handling. Code that
  99.      links with _l_i_b_s_p_o_o_l that must catch the SSSSIIIIGGGGCCCCLLLLDDDD signal should use the
  100.      PPPPOOOOSSSSIIIIXXXX signal handling functions to avoid conflicts between signal
  101.      handling mechanisms.
  102.  
  103. NNNNEEEETTTTWWWWOOOORRRRKKKK OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNNSSSS
  104.      Certain _l_i_b_s_p_o_o_l functions obtain information about network printers by
  105.      executing remote commands. It may be impossible for _l_i_b_s_p_o_o_l to obtain a
  106.      connection to the remote machine (remote machine is down, network is not
  107.      reachable, etc.). In this case the _l_i_b_s_p_o_o_l function will timeout and
  108.      return an error code. The timeout period, in seconds, is specified by the
  109.      global variable _S_L_n_e_t__t_i_m_e_o_u_t. The default timeout period is specified by
  110.      the value of SSSSLLLL____NNNNEEEETTTT____TTTTIIIIMMMMEEEEOOOOUUUUTTTT in _s_p_o_o_l._h.
  111.  
  112. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  113.      lp(1), lpr(1), sigaction(2)
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.